import React, { lazy } from 'react';
import { RouteType } from '../types';

const MainLayout = lazy(() => import('../mainLayout'))
const Home = lazy(() => import('../views/home'))
const ListAdd = lazy(() => import('../views/listAdd'))
const List = lazy(() => import('../views/list'))
const Set = lazy(() => import('../views/set'))

export const asyncRoutes: RouteType[] = [{
	path: '/home',
	element: <Home></Home>,
	meta: {
		permission_id: "100",
		title: '首页'
	},
}, {
	path: '/list',
	meta: {
		title: '列表操作',
		permission_id: "110",
	},
	children: [{
		path: '/list/manage',
		element: <List></List>,
		meta: {
			permission_id: "120",
			title: '列表管理'
		},
	}, {
		path: '/list/a',
		meta: {
			permission_id: "130",
			title: '列表二级'
		},
		children: [{
			path: '/list/add',
			element: <ListAdd></ListAdd>,
			meta: {
				permission_id: "140",
				title: '列表添加'
			},
		}]
	}]
}, {
	path: '/set',
	element: <Set></Set>,
	meta: {
		permission_id: "150",
		title: '设置'
	},
}]




